package com.neu.flashmall.product.mapper;

import com.neu.flashmall.product.entity.PmsAttr;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author 50286
* @description 针对表【pms_attr(商品属性)】的数据库操作Mapper
* @createDate 2022-07-10 15:42:34
* @Entity com.neu.flashmall.product.entity.PmsAttr
*/
@Mapper
public interface PmsAttrMapper {

    int deleteByPrimaryKey(Long id);

    int insert(PmsAttr record);

    int insertSelective(PmsAttr record);

    PmsAttr selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(PmsAttr record);

    int updateByPrimaryKey(PmsAttr record);

    List<PmsAttr> selectByGroup(Integer group);

    List<PmsAttr> selectDuplicate(@Param("group") Integer group,@Param("id") Long id,@Param("attrName") String attrName);

    int deleteAllByGroup(Integer group);

    List<PmsAttr> selectAll();

    int checkCanDeleteGroup(Long groupId);

    List<PmsAttr> getByCategoryIdForSpu(Long categoryId);

    List<PmsAttr> getByCategoryIdForSku(Long categoryId);

    List<PmsAttr> getByCategoryIdForFilter(Long categoryId);

}
